package com.qys.livesMall.financial.model.dto.sys;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * Created by IntelliJ IDEA.
 * User: dp
 * Date: 2023/06/10
 * Time: 10:15
 * DESCRIPTION:
 */
@Data
public class FinancialOfflineSaveDTO {

    @Schema(description = "id")
    private Long id;

    @Schema(description = "理财名称", example = "测试")
    @NotBlank(message = "please input financial name")
    private String name;

    @Schema(description = "理财明细", example = "测试测试测试测试测试测试测试测试")
    @NotBlank(message = "please input detail")
    private String detail;

    @Schema(description = "周期（多少天后可以重复完成任务）", example = "10")
    @NotNull(message = "please input product cycle")
    @Min(value = 1, message = "Please enter an integer greater than 1")
    private Integer cycle;

    @Schema(description = "用户等级", example = "1")
    @NotNull(message = "Please select a user level")
    private Long userLevelId;

    @Schema(description = "用户等级", example = "等级一")
    private String userLevel;

    @Schema(description = "余额区间", example = "0")
    @NotNull(message = "Please enter the balance limit information")
    @Min(value = 0, message = "The balance must be greater than 0")
    private BigDecimal amountMin;

    @Schema(description = "余额区间", example = "100")
    @NotNull(message = "Please enter the balance limit information")
    @Min(value = 0, message = "The balance must be greater than 0")
    private BigDecimal amountMax;

    @Schema(description = "收益百分比 改成固定值", example = "10")
    @NotNull(message = "Please enter the income")
    @Min(value = 0, message = "The income must be greater than 0")
    private BigDecimal income;

    @Schema(description = "任务明细信息")
    @NotEmpty(message = "Please add a task detail")
    private List<FinancialOfflineDetailSaveDTO> detailList;


    @Schema(description = "点赞数")
    private Integer likeCount;


    @Schema(description = "鲜花数")
    private Integer flowerCount;

    @Schema(description = "点赞数")
    private Integer likesCount;
}
